package com.offcn.service.Impl;

import com.offcn.dao.CourseDao;
import com.offcn.dao.Impl.CourseDaoImpl;
import com.offcn.entity.Course;
import com.offcn.service.CourseService;
import com.offcn.utils.PageTool;

import java.util.List;

public class CourseServiceImpl implements CourseService {
    CourseDao dao = new CourseDaoImpl();
    @Override
    public int getTotalCount(String search) {
        return dao.getTotalCount(search);
    }

    @Override
    public List<Course> findAllCourse(PageTool pageTool, String search) {
        return dao.findAllCourse(pageTool,search);
    }

    @Override
    public int addCourse(Course course) {
        return dao.addCourse(course);
    }

    @Override
    public int dellAll(String arr) {
        return dao.delAll(arr);
    }

    @Override
    public int updateCourse(Course course) {
        return dao.updateCourse(course);
    }

    @Override
    public Course findByCid(int cid) {
        return dao.findByCid(cid);
    }

    @Override
    public List<Course> findCourse(String uid, String cid) {
        return dao.findCourse(uid,cid);
    }

    @Override
    public List<Course> findByCourseType(String coursetype, int num) {
        return dao.findByCourseType(coursetype,num);
    }
}
